package com.lzw.mapper.student;

import com.lzw.pojo.LeaveRecord;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface LRM {

    @Insert("INSERT INTO dormitorymanagement.leaverecord(student, leave_reason,start_date,end_date) VALUES (#{student}, #{leaveReason}, #{startDate}, #{endDate})")
    void add(LeaveRecord leaveRecord);

    List<LeaveRecord> getLeaveRecordsByStudent(@Param("student") String student);

}
